<!DOCTYPE html>
<html>
<head lang="en">
	<meta charset="UTF-8">
	<title></title>
</head>
<body>
	<script src="perfFramework.js"></script>
	<script>
		function runTest(version, qs) {
			var ns = checkVersion("0.5") ? createjs : window;
			
			var canvas = document.getElementById("testCanvas");
			var w=canvas.width, h=canvas.height;
			var stage = new ns.Stage("testCanvas");
			stage.tickOnUpdate = false;
			
			var shape = new ns.Shape();
			stage.addChild(shape);
			var g = shape.graphics.moveTo(0,0).beginStroke("rgba(0,0,0,0.1)");
			
			time("total");
			time("draw");
			for (var i=0; i<10000; i++) {
				g.beginStroke(ns.Graphics.getHSL(Math.random()*360, 100, 50)).moveTo(0,0).lineTo(Math.random()*w,Math.random()*h);
			}
			endTime("draw");
			
			time("render");
			stage.update();
			endTime("render");
			endTime("total");
			
			endTest();
		}
	</script>
	
	<p>Tests performance of 10k vector graphics calls when changing stroke or fill frequently.</p>
	<canvas id="testCanvas" width="900" height="450"></canvas>
</body>
</html>